<?php
if($IncludeUpload !== true)
	exit();
	
    require_once('imageshack.class.php');
	$FileLoc = dirname(__FILE__).'/tmp/'.uniqid().'.png';
	
	file_put_contents($FileLoc, file_get_contents('data://'.substr($_POST['screenshot'], 7))); //hack protection
    $uploader = new ImageShackUploader('<your api key here>', 'testcookie');
    $response = $uploader->upload($FileLoc);
	@unlink($FileLoc);


?>
